﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
using System.Reflection;

using PickGold.Collections;

namespace PickGold.Attributes
{
	/// <summary>
	/// 数据属性
	/// </summary>
	[Serializable]
	[DataContract]
	[ComVisible(true)]
	[ClassInterface(ClassInterfaceType.AutoDispatch)]
	[Guid("7D5FBE3F-33D7-451E-AE50-202F495CB454")]
	[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
	public class CustomDataAttribute : Attribute
	{
		/// <summary/>
		public CustomDataAttribute()
		{
			//this.Items = null;
		}

		/// <summary/>
		public CustomDataAttribute(params object[] data)
		{
			this.Items = data;
		}

		/// <summary/>
		public CustomDataAttribute(bool data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(byte data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(sbyte data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(short data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(ushort data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(int data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(uint data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(long data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(ulong data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(float data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(double data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(decimal data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(string data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(Type data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(Guid data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public CustomDataAttribute(DateTime data)
		{
			this.Items = new object[] { data };
		}

		/// <summary/>
		public object[] Items { set; get; }
	}
}
